import axios from 'axios'

const instance = axios.create({
  baseURL: "http://s.linweiqin.com/api/s/",
});
/* 配置 响应的拦截器 data取出来 */
instance.interceptors.response.use(
  function (response) {
    return response.data;
  },
  function (error) {
    return Promise.reject(error);
  }
);

const rap2 = axios.create({
  baseURL: "http://rap2api.taobao.org/app/mock/273655/",
});
/* 配置 响应的拦截器 data取出来 */
rap2.interceptors.response.use(
  function (response) {
    return response.data;
  },
  function (error) {
    return Promise.reject(error);
  }
);
const img = axios.create({
  baseURL: "/",
});
/* 配置 响应的拦截器 data取出来 */
img.interceptors.response.use(
  function (response) {
    return response.data;
  },
  function (error) {
    return Promise.reject(error);
  }
);
export { rap2 , img }
export default instance;